package com.enumeration.demo03;

public class Test {
    public static void main(String[] args) {
        System.out.println("enum 枚举类 在企业中实战");
        System.out.println(Weekday.SUN);
        Weekday s = Weekday.SUN;
        // 集合Switch 使用
        switch (s) {
            case SUN:
                System.out.println("今天是 "+s.getDesc());
                break;
            case MON:
                System.out.println("今天是 "+Weekday.MON.getDesc());
                break;
            case TUE:
                System.out.println("今天是 "+Weekday.TUE.getDesc());
                break;
            case WED:
                System.out.println("今天是 "+Weekday.WED.getDesc());
                break;
            case THU:
                System.out.println("今天是 "+Weekday.THU.getDesc());
                break;
            case SAT:
                System.out.println("今天是 "+Weekday.SAT.getDesc());
                break;
        }
        System.out.println(Weekday.SUN.getDesc());
        // 比较 num值
        int number = 3;
        if (number == Weekday.WED.getNum()) {
            System.out.println("今天是周三");
        } else {
            System.out.println("今天不是周三！");
        }
        // 调用方法
        Weekday.WED.run();
        Weekday.go();
    }
}
